<form method="post" enctype="multipart/form-data" target="_blank" id="form-order">
    <div class="table-responsive">
        <table class="table table-bordered table-hover">
            <thead>
                <tr>
                    <td width="5%">
                        <a href="javascript:sort('user_id');">ID</a>
                    </td>
					<td width="30%">
                        <a href="javascript:sort('username');">广告内容</a>
                    </td>
                    <td width="50%">
                        <a href="javascript:sort('realname');">接收人</a>
                    </td>
                    <td width="15%">
                        <a href="javascript:sort('up_time');">发送日期</a>
                    </td>
                </tr>
            </thead>
            <tbody>
            <volist name="userList" id="list">
					<tr style="line-height:32px;">
					<td style="line-height:32px;">{$list.id}</td>
					<td style="line-height:32px;">
						{$list.content}
					</td>
					<td style="line-height:32px;word-break:break-all;overflow:hidden;height:34px;"><a title="{$list.user}">{$list.user}</a></td>
					<td style="line-height:32px;">{$list.add_time|date='Y-m-d H:i:s',###}</td>
                </tr>
            </volist>
            </tbody>
        </table>
    </div>
</form>
<div class="row">
    <div class="col-sm-3 text-left"></div>
    <div class="col-sm-9 text-right">{$page}</div>
</div>
<script>
    function delfunc(obj,num) {
		layer.confirm('确认冻结吗？', {
		  btn: ['确定','取消'] //按钮
		}, function(){
			layer.closeAll();
		    $.ajax({
				type: 'post',
				url: $(obj).attr('data-url'),
				data: {
					act: 'del',
					id: $(obj).attr('data-id')
				},
				dataType: 'json',
				success: function(data) {
					if (data.code==200) {
						if(data.status==1){
							$(obj).parent().prev().html('正常');
							$(obj).html('冻结');
						}else{
							$(obj).parent().prev().html('<span style="color:red;">冻结</span>');
							$(obj).html('解冻');
						}
					} else {
						layer.alert('冻结失败', {
							icon: 2
						});
					}
				}
			});
		});
	}
    $(".pagination  a").click(function () {
        var page = $(this).data('p');
        ajaxGetTable('search-form2', page);
    });
</script>
